import Koa from 'koa';
import http from 'http';
import store from './store';
import useMidware from './midware';

const app = new Koa();
const server = http.createServer(app.callback());

useMidware(app);

server.listen(store.state.port, () => {
    console.log(`service is running at http://localhost:${store.state.port}`);
});
